function ValidateThongTinCongTy() {
	var tencongty = document.getElementsByName("ThongTinCongTy_TenCongTy").item(0);
	if (tencongty.value == "") {
		alert("Please input TenCongTy");
		return false;
	}
	var emailcongty = document.getElementsByName("ThongTinCongTy_EmailCongTy").item(0);
	if (emailcongty.value == "") {
		alert("Please input EmailCongTy");
		return false;
	}
    var password = document.getElementsByName("ThongTinCongTy_MatKhauEmailCongTy").item(0);
    if (password.value == "") {
        alert("Please input MatKhauEmailCongTy");
        return false;
    }
    var confirmpassword = document.getElementsByName("ThongTinCongTy_XacNhanMatKhauEmailCongTy").item(0);
    if (confirmpassword.value == "") {
        alert("Please input XacNhanMatKhauEmailCongTy");
        return false;
    }
    if (password.value != confirmpassword.value) {
        alert("Input MatKhauEmailCongTy and XacNhanMatKhauEmailCongTy is not match");
        return false;
    }
	return true;
}


function ValidateLoaiTinTuc() {
	var tenloaitintuc = document.getElementsByName("LoaiTinTuc_TenLoaiTinTuc").item(0);
	if (tenloaitintuc.value == "") {
		alert("Please input TenLoaiTinTuc");
		return false;
	}
	return true;
}


function ValidateLoaiSach() {
	var tenloaisach = document.getElementsByName("LoaiSach_TenLoaiSach").item(0);
	if (tenloaisach.value == "") {
		alert("Please input TenLoaiSach");
		return false;
	}
	return true;
}

function ValidateDoiTac() {
	var tendoitac = document.getElementsByName("DoiTac_TenDoiTac").item(0);
	if (tendoitac.value == "") {
		alert("Please input TenDoiTac");
		return false;
	}
	var diachi = document.getElementsByName("DoiTac_DiaChi").item(0);
	if (diachi.value == "") {
		alert("Please input DiaChi");
		return false;
	}
	var dienthoai = document.getElementsByName("DoiTac_DienThoai").item(0);
	if (dienthoai.value == "") {
		alert("Please input DienThoai");
		return false;
	}
	return true;
}

function ValidateDanhGia() {
	var diem = document.getElementsByName("DanhGia_Diem").item(0);
	if (diem.value == "") {
		alert("Please input Diem");
		return false;
	}
	return true;
}


function ValidateNguoiDung() {
	var username = document.getElementsByName("NguoiDung_UserName").item(0);
	if (username.value == "") {
		alert("Please input UserName");
		return false;
	}
	var password = document.getElementsByName("NguoiDung_Password").item(0);
	if (password.value == "") {
		alert("Please input Password");
		return false;
	}
	var email = document.getElementsByName("NguoiDung_Email").item(0);
	if (email.value == "") {
		alert("Please input Email");
		return false;
    }
    var hoten = document.getElementsByName("NguoiDung_HoTen").item(0);
    if (hoten.value == "") {
        alert("Please input HoTen");
        return false;
    }
	return true;
}
